<div xmlns:th="http://www.thymeleaf.org" class="layui-header" th:fragment="header">
    <div class="layui-logo">This is my forum</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
        <li class="layui-nav-item">
            <a href="/admin/sysmgt">系统管理</a>
        </li>
        <li class="layui-nav-item">
            <a href="/admin/contentmgt">内容管理</a>
        </li>
        <li class="layui-nav-item">
            <a href="/admin/mailmgt">邮件管理</a>
        </li>
        <li class="layui-nav-item">
            <a href="javascript:;">测试</a>
            <dl class="layui-nav-child">
                <dd><a href="">XX</a></dd>
                <dd><a href="">YY</a></dd>
                <dd><a href="">ZZ</a></dd>
            </dl>
        </li>
    </ul>
    <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">
            <a href="javascript:;">
                <img src="http://via.placeholder.com/30x30" class="layui-nav-img"/>
                <span th:text="${session.SPRING_SECURITY_CONTEXT.authentication.principal.username }"></span>
            </a>
            <dl class="layui-nav-child">
                <dd><a th:href="${'/users/' + session.SPRING_SECURITY_CONTEXT.authentication.principal.id }">基本资料</a>
                </dd>
                <dd><a href="/index">回到前台</a></dd>
                <dd><a href="/users/setting">设置</a></dd>
            </dl>
        </li>
        <li class="layui-nav-item">
            <a href="/logout">退了</a>
        </li>
    </ul>
</div>